package com.wanter.paper.service.impl;

import com.wanter.paper.entity.Mould;
import com.wanter.paper.mapper.MouldMapper;
import com.wanter.paper.service.MouldService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * impl
 * Created by er on 17-7-16.
 */
@Service
public class MouldServiceImpl implements MouldService {
    private final Logger logger = Logger.getLogger(this.getClass());
    @Resource
    private MouldMapper mouldMapper;


    @Override
    public List<Mould> geParentMoulds() {
        logger.info("正在执行拿到全部的Mould");
        List<Mould> moulds = mouldMapper.geParentMoulds();
        if (moulds == null || moulds.size() < 0) {
            logger.error(this.getClass()+"未在数据库中配置摹本题的类型");
        }
        return moulds;
    }
}
